package org.jeecgframework.web.service;
import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.ZyCommonAddressEntity;

import java.io.Serializable;
import java.util.List;
public interface ZyCommonAddressServiceI extends CommonService{
	
 	public <T> void delete(T entity);
 	
 	public <T> Serializable save(T entity);
 	
 	public <T> void saveOrUpdate(T entity);
 	
 	/**
	 * 默认按钮-sql增强-新增操作
	 * @param id
	 * @return
	 */
 	public boolean doAddSql(ZyCommonAddressEntity t);
 	/**
	 * 默认按钮-sql增强-更新操作
	 * @param id
	 * @return
	 */
 	public boolean doUpdateSql(ZyCommonAddressEntity t);
 	/**
	 * 默认按钮-sql增强-删除操作
	 * @param id
	 * @return
	 */
 	public boolean doDelSql(ZyCommonAddressEntity t);

    public void addNewAddress(ZyCommonAddressEntity address);

    public boolean checkIfCanAdd(String userName);

    public void setDefault(String id);

    public List<ZyCommonAddressEntity> getAddressByUser(String userName);

    public ZyCommonAddressEntity getDefaultAddress(String userName);
}
